import Vue from 'vue';
import Router from 'vue-router';
const path = require('path');




/*首页*/
import Index from '@/router/Index';
/*充电地图*/
const Map = resolve => require(['@/router/map'], resolve);
/*充电主页*/
const Charge = resolve => require(['@/router/Charge'], resolve);
/*输入code充电*/
const ChargeCode = resolve => require(['@/router/ChargeCode'], resolve);
/*充电详情*/
const ChargeDetails = resolve => require(['@/router/ChargeDetails'], resolve);
/*充电记录*/
const ChargeRecord = resolve => require(['@/router/ChargeRecord'], resolve);
/*选择时间，开始充电*/
const ChargeSelect = resolve => require(['@/router/ChargeSelect'], resolve);

/*账户中心*/
const Account = resolve => require(['@/router/Account'], resolve);

/*账户充值*/
const Recharge = resolve => require(['@/router/Recharge'], resolve);
/*充值记录*/
const RechargeRecord = resolve => require(['@/router/RechargeRecord'], resolve);

/*用户协议*/
const Agreement = resolve => require(['@/router/Agreement'], resolve);
/*投诉建议*/

const Suggestion = resolve => require(['@/router/Suggestion'], resolve);
/*添加员工*/
const AddEmploy = resolve => require(['@/router/AddEmploy'], resolve);

/*添加员工*/
const EmployDetails = resolve => require(['@/router/EmployDetails'], resolve);
/*企业帐号（员工列表）*/
const EmployList = resolve => require(['@/router/EmployList'], resolve);

/*充电桩信息*/
const DeviceInfo = resolve => require(['@/router/DeviceInfo'], resolve);

/*企业邀请二维码*/
const InviteCode = resolve => require(['@/router/EmployInvite'], resolve);

// 收藏夹列表
const MyFavority = resolve => require(['@/router/Favority'], resolve);

// 支付结果页
const PayResult = resolve => require(['@/router/PayResult'], resolve);

// 支付结果页
const AboutUs = resolve => require(['@/router/AboutUs'], resolve);

// 支付结果页
const Help = resolve => require(['@/router/Help'], resolve);
// 支付结果页
const Business = resolve => require(['@/router/Business'], resolve);


Vue.use(Router);

export default new Router({
  base:  path.resolve(__dirname),
  app: "/",
  scrollBehavior: () => ({y: 0}),
  routes: [
    {
      desc:"首页",
      path: '/',
      name: '首页',
      component: Index
    },
    {
      desc:"首页",
      path: '/index',
      name: '首页',
      component: Index
    },
    {
      desc:"首页",
      path: '/map',
      name: '首页',
      component: Map
    },
    {
      desc:"选择充电模式（二维码，code）",
      path: '/charge',
      name: 'charge',
      component: Charge
    },
    {
      desc:"编号充电",
      path: '/chargeCode',
      name: 'ChargeCode',
      component: ChargeCode
    },
    {
      desc:"充电详情",
      path: '/chargeDetails',
      name: 'ChargeDetails',
      component: ChargeDetails
    },
    {
      desc:"充电记录",
      path: '/chargeRecord',
      name: 'ChargeRecord',
      component: ChargeRecord
    },
    {
      desc:"我的账号",
      path: '/account',
      name: 'Account',
      component: Account
    },
    {
      desc:"协议",
      path: '/agreement',
      name: 'Agreement',
      component: Agreement
    },
    {
      desc:"充值",
      path: '/recharge',
      name: 'Recharge',
      component: Recharge
    },
    {
      desc:"建议",
      path: '/suggestion',
      name: 'Suggestion',
      component: Suggestion
    },
    {
      desc:"关于我们",
      path: '/aboutus',
      name: 'aboutus',
      component: AboutUs
    },
    {
      desc:"使用帮助",
      path: '/help',
      name: 'help',
      component: Help
    },
    {
      desc:"招商",
      path: '/business',
      name: 'business',
      component: Business
    },
    {
      desc:"充电确认",
      path: '/chargeStart',
      name: 'chargeSelect',
      component: ChargeSelect
    },
    {
      desc:"充值记录",
      path: '/rechargeRecord',
      name: 'rechargeRecord',
      component: RechargeRecord
    },
    {
      desc:"企业用户列表",
      path: '/employList',
      name: 'employList',
      component: EmployList
    },
    {
      desc:"添加员工",
      path: '/addEmploy',
      name: 'addEmploy',
      component: AddEmploy
    },
    {
      desc:"充电站信息",
      path: '/deviceInfo',
      name: 'deviceInfo',
      component: DeviceInfo
    },
    {
      desc:"收藏夹列表",
      path: '/myfavority',
      name: 'myfavority',
      component: MyFavority
    },
    {
      desc:"支付结果",
      path: '/payresult',
      name: 'payresult',
      component: PayResult

    },
    {
      desc:"邀请二维码",
      path: '/invitecode',
      name: 'invitecode',
      component: InviteCode
    },
    {
      desc:"企业员工信息",
      path: '/employDetails',
      name: 'employDetails',
      component: EmployDetails
    }
  ]
})







































